package com.bailun91.auth.util;

import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;

public class MD5Utils {

    private static final String ALGORITH_NAME = "md5";

    private static final int HASH_ITERATIONS = 2;


    public static String encrypt(String pswd) {

        String newPassword = new SimpleHash(ALGORITH_NAME, pswd, null,
                HASH_ITERATIONS).toHex();
        return newPassword;

    }

    public static void main(String[] args) {


    }

}
